home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / tf1_21pr.zip / TFORTMAP.TXT < prev   
Text File  |  1996-09-10  |  24KB  |  594 lines

  1. *==============================================================*
  2. * TeamFortress v1.2                                tfortmap.txt   *
  3. *==============================================================*
  4. Introduction
  5. ------------
  6.  
  7. If you haven't read the readme.txt by now, please do.
  8.  
  9. This file contains details about making Maps specifically
  10. for TeamFortress. You don't need to know these details to 
  11. play the game, even on a TeamFortress Map.
  12.  
  13. If you do make a TeamFortressMap, could you mail us and tell us? 
  14. We'd like to create a collection of TeamFortressMaps on the 
  15. WWW page (http://minyos.its.rmit.edu.au/~cookj)
  16.  
  17. The first map using these specs is available on the www page now.
  18. Don't forget you can simply view the .bsp file to look at the
  19. entities inside the map.
  20.  
  21. It just shows a simple use of these to make a Capture-The-Flag map.
  22. It could easily be expanded to have multiple flags, with multiple
  23. places to have them taken to, in certain orders...etc
  24.  
  25. More info on anything mentioned here may be in the readme.txt
  26.  
  27. Oh, and some variables we use for the Goal entities are variables
  28. used for completely different things for other entities. We did
  29. this to preserve variable space.
  30.  
  31. Robin and John.
  32.  
  33. ------------------------------
  34. TeamFortressMap Specification
  35. ------------------------------
  36. Apart from being a normal map, TeamFortress Maps 
  37. have the following changes:
  38.  
  39.     Auto Detection
  40.     Team SpawnPoints
  41.     Armor                  (Still to be Done. :)
  42.  
  43.     Goals
  44.     GoalItems
  45.     Timer Goals
  46.  
  47. ----------------------------------------------------------------------------
  48. Auto Detection
  49. ----------------------------------------------------------------------------
  50. TeamFortress maps will be automatically detected by the TeamFortress patch
  51. if you put an entity in the map with a classname of "info_tfdetect".
  52. This makes TeamFortress automatically turn on the FORTRESSMAP toggleflag,
  53. and turn on teamplay.
  54. In the future, this entity will be used to automatically set _any_
  55. toggleflag, and some other stuff.
  56.  
  57. Also, once the TeamFortress map has been detected, the patch will look
  58. for any spawnpoints dedicated to teams (see below).
  59. If it finds any, it will look for the highest team number that is used.
  60. Once found, it will limit anybody attempting to join a team to that 
  61. number.
  62. E.g. If the highest team number used by a Team Spawnpoint is 3, then
  63.      the patch will only allow players to join teams 1, 2, and 3.
  64.  
  65. ----------------------------------------------------------------------------
  66. Team Spawnpoints
  67. ----------------------------------------------------------------------------
  68. There is now a new entity for Team Spawnpoints. Team Spawnpoints are used
  69. to make players only spawn in points designated for their team. Use it
  70. to make players spawn inside their own base/fortress.
  71. The entity is called "info_player_teamspawn", and the "team_no" variable
  72. sets the team_no that owns this spawnpoint.
  73.  
  74. ----------------------------------------------------------------------------
  75. Goal Summary / Terminology
  76. ----------------------------------------------------------------------------
  77. Goals are the really fun things you can do with TeamFortressMaps.
  78. A goal is simply an entity you place in a map. It is then handled
  79. in the game based on the flags you give it. They're essentially
  80. more complex triggers. I've kept all the code separate from 
  81. the triggers tho, to allow us to toggle the use of them ingame.
  82. The flags and variables set for a Goal allow us to create powerful
  83. maps without changing the QuakeC code at all.
  84. -----------
  85. Goals 
  86. -----------
  87. Goals are always in one of the following states:
  88.  
  89. ACTIVE    :    The goal has been activated in some way. 
  90.             It cannot be touched by a player.
  91.             Active goals return to the INACTIVE state based on their
  92.             result criteria, or when they're forced into INACTIVE state
  93.             by another goal.
  94.  
  95. INACTIVE:    The goal is not active. 
  96.             It can be touched by players, and if the players meet the 
  97.             activation criteria, the goal moves    to the ACTIVE state.
  98.  
  99. REMOVED :    The goal is not active.
  100.             It cannot be touched by players.
  101.             Removed goals can still be activated by other goals, in which
  102.             case they move to the ACTIVE state.
  103.             Removed goals can be restored to the INACTIVE by being restored
  104.             by another goal.
  105.  
  106. Terminology
  107. -----------
  108.  
  109. activated    : Goal moves to the ACTIVE state
  110. inactivate    : If the Goal is in ACTIVE state, it moves to the INACTIVE state
  111. removed        : Goal moves to the REMOVED state
  112. restored    : If the Goal is in REMOVED state, it moves to the INACTIVE state
  113.  
  114. returned    : GoalItems can be returned to their starting point, based on
  115.               a number of settings.
  116.  
  117. Goal Group  : A group of goals that can be altered as one.
  118.  
  119. Activating Player(AP): The player who either touched the Goal, or set the
  120.                        detpack which touched the Goal.
  121.  
  122. Actions
  123. -------
  124. When goals go to ACTIVE state, they can perform various actions.
  125. These include:
  126.  
  127.     - Increase the score of the team the AP belongs to.
  128.     - Display a message to all players
  129.     - Display a message just to the AP
  130.  
  131.     - Alter the AP's health/ammo/armor/powerups
  132.  
  133.     - Give the AP a GoalItem
  134.     - Remove a GoalItem from an AP
  135.  
  136.     - Activate another goal, applying the bonuses of the goal to the AP
  137.     - Activate another goal, without applying the bonuses of the goal to the AP
  138.     - Inactivate another goal
  139.     - Remove another goal
  140.     - Restore another goal
  141.  
  142.     - Activate a goal if all the goals in a goal group are now ACTIVE
  143.     - Activate a group of goals
  144.     - Inactivate a group of goals
  145.     - Remove a group of goals
  146.     - Restore a group of goals
  147.  
  148.     - Display team's scores and End the Level
  149.  
  150. Activation
  151. ----------
  152. Goals can be activated in one of the following ways:
  153.  
  154.     - Touched by a player
  155.     - Touched by a detpack explosion
  156.     - Activated by another Goal
  157.     - Activated by a Goal Group command from another Goal
  158.  
  159. Additionally, the AP's details can be checked.
  160. This allows you to have goals that are only activated if:
  161.  
  162.     - The AP is of a particular class
  163.     - The AP has a particular GoalItem
  164.     - The AP is of a particular team
  165.  
  166. Inactivation
  167. ------------
  168. Goals can be inactivated in one of the following ways:
  169.  
  170.     - Inactivated after being ACTIVE for a specified time
  171.     - Inactivated by another Goal
  172.     - Inactivated by a Goal Group command from another Goal
  173.  
  174. Also, some goals are marked as Multiple Goals. They return to INACTIVE
  175. state immediately after they become ACTIVE.
  176.  
  177. Removal
  178. -------
  179. Goals can be removed in one of the following ways:
  180.  
  181.     - Removed after being activated
  182.     - Removed by another Goal
  183.     - Removed by a Goal Group command from another Goal
  184.  
  185. Restoration
  186. -----------
  187. Goals can be restored in one of the following ways:
  188.  
  189.     - Restored by a GoalItem when it Returns (See below).
  190.     - Restored by another Goal
  191.     - Restored by a Goal Group command from another Goal
  192.  
  193. ---------
  194. GoalItems
  195. ---------
  196. GoalItems are items that players can carry around.
  197. GoalItems can be placed directly into a map, where a player
  198. can collect them as usual.
  199. Also, on activation, Goals can give/remove GoalItems from the AP.
  200. The details of players attempting to collect the GoalItems can
  201. also be checked.
  202. This allows you to have GoalItems that can only be picked up if:
  203.  
  204.     - The Player is of a particular class
  205.     - The Player has a particular GoalItem
  206.     - The Player is of a particular team
  207.  
  208. GoalItems can be returned to their starting position in any of the
  209. following circumstances:
  210.  
  211.     - When it's dropped by a dying player
  212.     - When it's removed from an AP by a Goal activation
  213.     - When it's untouched for a specified time
  214.  
  215. -----------
  216. Timer Goals
  217. -----------
  218. There is also a special type of goal called a Timer Goal. TG's 
  219. have a Timer Delay. TG's start INACTIVE, and then every Timer
  220. Delay seconds they activate, do their results, and inactivate.
  221. They can also be forced to activate by other Goals. They cannot
  222. be activated by player or detpack touches.
  223. N.B. When a TG goes ACTIVE, it does not have any AP, and hence
  224.      _cannot_ do any operations on players, or _activate_ other goals.
  225.  
  226. N.B. When a TG is forced to activate by another goal, they reset
  227.      their internal timer that decides when they are next going
  228.      to activate. 
  229.      E.g. If a TG with a setting of 5 seconds is forced to activate,
  230.           it will reset it's  timer, and still activate 5 seconds after
  231.           it was forced to activate.
  232.  
  233. So, as a quick summary, TG's can have their state altered as 
  234. usual by other goals, and when they activate, they can:
  235.  
  236.     - Display a message to all players
  237.  
  238.     - Inactivate another goal
  239.     - Remove another goal
  240.     - Restore another goal
  241.  
  242.     - Inactivate a group of goals
  243.     - Remove a group of goals
  244.     - Restore a group of goals
  245.  
  246.     - Display team's scores and End the Level
  247.  
  248. At the moment, TG's are handled in an ugly way, so be extremely 
  249. careful when using them. The next release of this should have them 
  250. wrapped up in a neat little package, where you can't do 
  251. anything wrong with them :)
  252.  
  253. ----------------
  254. Order of Actions
  255. ----------------
  256. You don't really need to know the order in which the actions are applied,
  257. but here it is anyway:
  258.  
  259. Screen Flash
  260.  
  261. Display Broadcast Message
  262. Display Personal Message
  263. Increase Team Score
  264.  
  265. Apply Stats to AP
  266. Apply Powerups to AP
  267. Update Ammo display
  268.  
  269. Give GoalItem to AP     (if any)
  270. Remove GoalItem from AP (if any)
  271.  
  272. End Level                (if set)
  273.  
  274. Goal Group Checking
  275.     Activate another Goal if all Goals in Group are active    (if set)
  276.     Activate all goals in a Group                            (if set)
  277.     Inactivate all goals in a Group                            (if set)
  278.     Remove all goals in a Group                                (if set)
  279.     Restore all goals in a Group                            (if set)
  280.  
  281. Active Another Goal        (if any)
  282. Remove Another Goal        (if any)
  283. Restore Another Goal    (if any)
  284. Inactivate Another Goal    (if any)
  285.  
  286. ----
  287. N.B. The Group Goal alterations are applied _before_ the single goal 
  288.      alterations. This is so you can do things like: 
  289.      Inactivate an entire group, and then activate one goal in that group.
  290.      Remove an entire group, and then restore one goal in that group.
  291.  
  292. ----------------------------------------------------------------------------
  293. Goal Technical Info
  294. ----------------------------------------------------------------------------
  295. Goal behaviour is entirely defined by the variables of the Goal object
  296. when it is spawned at the start of the level. These variables are set
  297. in the map file. Just add up the flags that you want and set the 
  298. variable to that. 
  299. E.g. If you want a goal that can be activated by a Player touch(1) and
  300.      a detpack explosion(2), you would set the "goal_activation" variable
  301.      to 3.
  302. An example goal may look like this:
  303. {
  304.     "classname"         "info_tfgoal"
  305.       "origin"            "-196 -8 -228"
  306.     "goal_no"           "6"
  307.     "group_no"          "2"
  308.     "wait"              "5"
  309.     "goal_activation"     "1"
  310.     "goal_result"         "2"
  311.     "message"           "Goal!\n"
  312. }
  313. This goal would print "Goal!" when activated. It would then stay
  314. active for 5 seconds, during which time it could not be activated
  315. again. It would then move back to INACTIVE state.
  316. Don't worry! It's actually fairly easy :)
  317. N.B. Bit descriptions marked with (*) are dangerous, and should
  318.      be handled with care.
  319.  
  320. The variables of the Goals are handled as follows:
  321.  
  322.     classname     :    "info_tfgoal"
  323.     netname        :    Message broadcasted when this goal is activated, if any.
  324.                     Don't forget to put the \n at the end of it.
  325.     message        :    Message displayed to the activating player, if any.
  326.                     Don't forget to put the \n at the end of it.
  327.     killtarget    :    Message broadcasted if the goal    kills the activating
  328.                     player. It is appended to the name of the player.
  329.                     E.g. deathtype = " gets killed by a goal!\n" displays
  330.                          Bro gets killed by a goal!
  331.                     Not needed if this goal doesn't do damage to a player.
  332.                     Don't forget to put the \n at the end of it. 
  333.     count        :    Score the team of the player who activates this goal gets.
  334.                     Use negative numbers for penalty goals.
  335.     goal_no        :    A unique number ID identifying this goal. Used to make
  336.                     references to this goal in other goals.
  337.     group_no    :    The number of the goal group this goal belongs to.
  338.     
  339. All the following attributes are applied to the attributes of
  340. the player who activates the goal. (e.g. the self.health is added to
  341. the health of the player who activates the goal)
  342.     health         :    Use negative values to hurt the player
  343.     armortype     :     Use negative values to remove armor % reduction
  344.     armorvalue     :    Use negative values to remove armor
  345.     frags         :    Use negative values to lower frag count
  346.     ammo_shells  :    Use negative values to remove ammo
  347.     ammo_nails   :    Use negative values to remove ammo
  348.     ammo_rockets :     Use negative values to remove ammo
  349.     ammo_cells   :    Use negative values to remove ammo
  350.     ammo_medikit :    Use negative values to remove ammo
  351.     ammo_detpack :    Use negative values to remove ammo
  352.  
  353. Note A:    After applying all these values to the player who activated the
  354.         goal, the playerclass limitations of the player are applied. So
  355.         if you set the health of the activating player over that allowed,
  356.         by his/her playerclass, it will then be lowered to the max_health
  357.         for that playerclass.
  358.  
  359. TeamFortress Grenades can be given/removed to/from the player by setting
  360. the following two variables.
  361.     no_grenades_1    :    Use negative values to remove grenades
  362.     no_grenades_2    :    Use negative values to remove grenades
  363.  
  364. And finally, the following attributes are added to the global time
  365. and applied to player who activated the goal. (e.g. if the goal's
  366. invincible_finished is 5, then they player who activated the goal will
  367. get invincibility for 5 seconds after activating the goal.)
  368.     invincible_finished        :    Pentagram of Protection     
  369.     invisible_finished        :    Ring of Shadows
  370.     super_damage_finished    :    Quad Damage
  371.     radsuit_finished        :    Environmental Suit
  372.  
  373. ---------------------------
  374. Goal Activation
  375. ---------------------------
  376. The "goal_activation" of the goals determine how the goal is activated. 
  377. The bitfields are as follows:
  378.  
  379. Activation Details
  380.     1    :    Activated when touched by a player.
  381.     2    :    Activated when touched by a detpack explosion.
  382.  
  383. AP Details
  384.     4    :    AP must be carrying a GoalItem. 
  385.             The ID of the GoalItem is specified in "items_allowed". 
  386.     8    :    AP must be of a specific class. 
  387.             The    class is specified in the "playerclass" variable of the goal.
  388.     16    :    AP must be of a specific team. 
  389.             The    team is specified in the "team_no" variable.
  390.     32  :    This goal is a Timer Goal. See Timer Goals above.
  391.                The Timer Delay is specified in the "search_time" variable. 
  392.  
  393.  
  394. ---------------------------
  395. Goal Results
  396. ---------------------------
  397. The "goal_result" of the goals determine how the goal behaves when it is 
  398. activated, and the results of it's activation. 
  399. The bitfields are as follows:
  400.  
  401. Respawn behaviour
  402.     1    :    The goal immediately removed after it is activated.
  403.     2    :    The goal stays ACTIVE for the amount of time in the "wait",
  404.             and is then inactivated.
  405.  
  406. GoalItem behaviour
  407.     4    :    The goal gives a GoalItem to the AP.
  408.             The ID of the GoalItem is specified in "items". 
  409.     8   :    The goal removes a GoalItem from the player if they have it,
  410.             The ID of the GoalItem is specified in "axhitme".
  411.  
  412. Goal behaviour
  413.     16    :    Activate a goal.
  414.             The ID of the Goal is specified in "impulse". 
  415.     32    :    InActivate a goal.
  416.             The ID of the Goal is specified in "distance". 
  417.     64  :     Remove a goal.
  418.             The ID of the Goal is specified in "waitmin". 
  419.     128    :    Restore a goal.
  420.             The ID of the Goal is specified in "waitmax". 
  421.     256    :    If this is set, the goal activated by (16) adds it's bonuses
  422.             to the activating player's stats.
  423.  
  424. Miscellaneous
  425.     512 :    Display teamscores, fire intermission, and end the level
  426.  
  427. ----
  428. Note A: If neither (1) or (2) are set, then the goal is a Multiple Goal.
  429.         After it activates, it will automatically inactivate.
  430.         This is not always a good idea. When a player runs over an entity,
  431.         the touch function will usually be run about 6 or 7 times, so the
  432.         player will activate the goal multiple times. If you want a player
  433.         to be able to activate it over and over again, make it respawn 
  434.         every 2-3 seconds.
  435.         This is especially dangerous if the goal gives out an item on
  436.         activation, since you will end up with a _lot_ of items.
  437.         Of course, you may want this for a goal that is activated remotely
  438.         by another goal at certain times.
  439.  
  440. Note B: (16) through to (128) allow you to alter the state of other goals.
  441.         If you want multiple goals altered by this goal, you probably
  442.         want to use a goal group instead. See below.
  443.  
  444. Note C:    When a goal is activated by another goal, _no_ checking is done
  445.         based on the "goal_activation" variable of the target goal. It is
  446.         simply activated. The AP who activated the original goal is used
  447.         as the activator for all the goals, but the stats of the activated
  448.         goal are only added to the player's if (256) is set on the first
  449.         goal. 
  450.         GoalItems are always given.
  451.  
  452. ---------------------------
  453. Goal Groups
  454. ---------------------------
  455. Goal groups allow you to do operations of multiple goals in one go.
  456. The "group_no" of a Goal defines the ID of goal group it is in.
  457. Any goal group operation affects all goals with the specified ID.
  458. A goal's "goal_group" specifies what operations, if any, it performs
  459. on any goal groups.
  460. The bitfields are as follows:
  461.     1    :    If all goals in the group specified by the ID in "height" are 
  462.             currently activated, activate a goal.
  463.             The ID of the Goal is specified in "last_impulse". 
  464.     2    :    Activate all goals in a group
  465.             The ID of the Group is specified in "aflag". 
  466.     4    :    Inactivate all goals in a group
  467.             The ID of the Group is specified in "dmg". 
  468.     8    :    Remove all goals in a group
  469.             The ID of the Group is specified in "cnt". 
  470.     16    :    Restore all the goals in a group
  471.             The ID of the Group is specified in "pausetime". 
  472.  
  473. ----
  474. Note A: When a goal is activated by another goal, _no_ checking is done
  475.         based on the "goal_activation" variable of the target goal. It is
  476.         simply activated. The AP who activated the original goal is used
  477.         as the activator for all the group goals.
  478.         Bonuses of goals in groups are _never_ applied to the activating player.
  479.         GoalItems are always given.
  480.  
  481. ----------------------------------------------------------------------------
  482. Goal Items
  483. ----------------------------------------------------------------------------
  484. GoalItems do not have to be given to a player by a Goal activation.
  485. The variables of the GoalItems are as follows:
  486.  
  487.     classname     :    "item_tfgoal"
  488.     netname      :    Name of this GoalItem.
  489.     message        :    Message broadcasted when this goalitem is retrieved, if any.
  490.                     Don't forget to put the \n at the end of it.
  491.     deathtype    :    Message displayed to a player when they get the Item, if any.
  492.                     Don't forget to put the \n at the end of it.
  493.     noise        :    A .wav file played when the item is collected, if any. 
  494.                     Make sure it's a .wav file you've got. It's probably 
  495.                     best to use one of Quake's .wavs. 
  496.                     It defaults to the key pickup.
  497.     mdl            :    The .mdl file used for this item. Make sure it's a .mdl
  498.                     file you've got. It's probably best to use one of Quake's
  499.                     .mdls. It defaults to the silver key.
  500.     goal_no        :    A unique number identifying this GoalItem. Used to make
  501.                     references to this Item in goals.
  502.  
  503. GoalItems themselves have various bitfields to depict the GoalItem's
  504. behaviour. The bitfields are stored in the GoalItem's "goal_activation"
  505. variable, and are:
  506.  
  507. Carrying Details
  508.     1    :    Any player carrying this item will glow.
  509.     2    :    Any player carrying this item will move at half-speed.
  510. (*)    4    :    When a player carrying this is killed, the item will be dropped
  511.  
  512. Returning
  513.     8    :    Return the item    if dropped by a dying player
  514.     16    :    Return the item if removed from a player by a goal activation.
  515.     32    :    Return the item if removed from the map by the action of (256).
  516.     64    :    When this item is returned to it's original position, restore
  517.             a goal. The ID of the Goal is specified in "impulse". 
  518.  
  519. Pickup Details
  520.     128    :    Player must be carrying a GoalItem to get this item. 
  521.             The ID of the GoalItem is specified in "items_allowed". 
  522.     256    :    Player must be of a specific class to get this GoalItem.
  523.             The    class is specified in the "playerclass" variable of the goal.
  524.     512    :    Player must be of a specific team to get this GoalItem.
  525.             The    team is specified in the "team_no" variable.
  526.  
  527. Miscellaneous
  528.    1024 :    GoalItem does not exist until given to a player by a Goal
  529.    2048 :    Remove GoalItem if left untouched after being dropped by a player
  530.             for more than the number of minutes specified in the "delay" variable.
  531.  
  532. ----
  533. Note A: (4) is dangerous. If you have goals giving out this item multiple
  534.         times, make sure the item is getting removed somehow, or you could
  535.         end up with too many items on the map.
  536.  
  537. Note B: The Pickup details (128)(256)(512) are only used when a player picks
  538.         up this item directly. If this item is given to an AP by a goal, these
  539.         are ignored.
  540.  
  541. Note C:    If (1024) is set, the GoalItem is not actually placed in the map at the
  542.         start of the level.    Once a player activates the Goal that gives this 
  543.         item to him/her, it will be spawned. Use this bit for items that 
  544.         will never actually be seen by the player, or for items that are never 
  545.         seen until they're dropped by a dying player carrying them. If this 
  546.         bit is set, and (4) is not set, then you don't need to specify a
  547.         .mdl file, since this item will never be seen.
  548.  
  549. Note D: (2048) allows you to make items that are untouched for a while
  550.         disappear. This should be set if you have Goals that give out
  551.         multiple copies of GoalItems that are dropped when players carrying
  552.         them are killed. Otherwise you could end up with too many entities
  553.         on the map :)
  554.         If you have a GoalItem that is only given out once and is dropped
  555.         when players with it die, you will probably want to set this flag
  556.         and flag (32), so that if it falls in lava or something, it'll 
  557.         be returned.
  558.         The time it takes before it is removed can be set in the "delay"
  559.         variable. It defaults to 2 minutes if you don't specify one.
  560.  
  561. ---------------------------
  562. Future Additions
  563. ---------------------------
  564. Goals need to be attached to triggers, so that activations of a goal
  565. can fire a standard Quake trigger, and vice versa.
  566. Also, goals need to be able to be triggered when they take 
  567. a certain amount of damage.
  568. Timer Goals need to be smarter. I'd like them to be able to somehow
  569. get an AP, and let them activate other goals. Maybe even activate
  570. goals using All the players on a map...
  571.  
  572. ---------------------------
  573. Hopefully, I'll release a map soon that will look crap,
  574. but it'll have lots of gratuitous use of goals, showing the
  575. sort of things that can be done with them.
  576.  
  577. In the meantime, muck around with them.
  578. I haven't been able to test everything extensively, so any
  579. comments, suggestions, and bug reports are welcome as
  580. usual.
  581. In fact, this is probably the first chunk of code I've that
  582. took far longer to test than it did to write!
  583.  
  584. So far, I've tested everything fairly well except Timer Goals and
  585. Goal Groups. If you use either of these, and see strange behaviour,
  586. please mail me and tell me.
  587. You may just want to wait a week or so before using either of these
  588. instead. It should only take me a 3-4 days to test them well myself,
  589. and add in attachment to standard Quake triggers.
  590.  
  591. And if you think of any more things goals could do when activated,
  592. please don't hesitate to mail them to me.
  593.  
  594. Robin.